import axios from './axios.base';

export default {
  async addAddress(data: any){
    const res=await axios.post('/api/address',data);
    return res.data;
  },

  async delAddress(id: number){
    const res=await axios.delete(`/api/address/${id}`);
    return res.data;
  },

  async getAddress(params: any={}){
    const target={
      limit:10,
      page:1,
    }
    Object.assign(target,params);
    const res=await axios.get('/api/address',{
      params:target
    });
    return res.data;
  },
}